<link rel="import" href="../../../../packages/polymer/polymer.html">
<link rel="import" href="instance_ref.html">
<link rel="import" href="observatory_element.html">
<link rel="import" href="service_ref.html">

<polymer-element name="field-ref" extends="service-ref">
  <template>
  <link rel="stylesheet" href="css/shared.css">
    <span>
      <template if="{{ ref.isStatic] }}">static</template>
      <template if="{{ ref.isFinal }}">final</template>
      <template if="{{ ref.isConst }}">const</template>
      <template if="{{ (ref.declaredType.name == 'dynamic' &&
                        !ref.isFinal && !ref.isConst) }}">var</template>
      <template if="{{ (ref.declaredType.name != 'dynamic') }}">
      <instance-ref ref="{{ ref.declaredType }}"></instance-ref>
      </template>
      <a on-click="{{ goto }}" title="{{ hoverText }}" _href="{{ url }}">{{ name }}</a>
    </span>
  </template>
</polymer-element>

<script type="application/dart" src="field_ref.dart"></script>
